﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CognisessWeb.Models.NewsModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>NewsDetails</h2>

    <fieldset>
        <legend>Fields</legend>

        <%foreach (var item in Model.Posts)
          {%>
        <div class="display-label">Title:</div>
        <div class="display-field"><%= Html.Encode(Model.Title) %></div>
        
        <div class="display-label">Second Title:</div>
        <div class="display-field"><%= Html.Encode(item.Title) %></div>
        
        <div class="display-label">NewsName:</div>
        <div class="display-field"><%= Html.Encode(Model.NewsName) %></div>
                
        <div class="display-label">Content:</div>
        <div class="display-field"><%= Html.Encode(Model.NewsContent) %></div>
        
        <div class="display-label">DateCreated:</div>
        <div class="display-field"><%= Html.Encode(item.DateCreated) %></div>
              
              
          <%}  %>
        
        
    </fieldset>
    <p>
        <%= Html.ActionLink("Edit", "Edit", new { /* id=Model.PrimaryKey */ }) %> |
        <%= Html.ActionLink("Back to List", "/LatestNews") %>
    </p>

</asp:Content>

